﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Menu.UCControl {
    public partial class UCTaskPane : UserControl {
        public UCTaskPane() {
            InitializeComponent();

           ucType1.PptTypeChangeHandler += new EventHandler<PptTypeChangeEventArgs>(ucType1_PptTypeChangeHandler);
            
        }


        void ucType1_PptTypeChangeHandler(object sender, PptTypeChangeEventArgs e) {
            panelUsual.Controls.Clear();
            panelChart.Controls.Clear();
            panelOther.Controls.Clear();

            panelUsual.Controls.Add(new UCUsual());
            panelChart.Controls.Add(new UCChart());

            Control c = null;
            if (e.Index == 1) {
                c = new UCSign();
            } else if (e.Index == 2) {
                c = new UCGroup();
            }

            panelOther.Controls.Add(c);
        }

        private void ucType1_Load(object sender, EventArgs e)
        {


        }

        private void UCTaskPane_Load(object sender, EventArgs e)
        {

        }


    }
}
